﻿<!DOCTYPE HTML PUBLIC"-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
    
    <head>
        <title>
            Binding Test - 吾乐吧软件站 - www.wuleba.com
        </title>
        <script type="text/javascript">
            function InsertResult(arg0) {
                var obj = window.document.getElementById("result");
                var insert = window.document.createElement("div");
                insert.innerHTML = arg0;
                obj.appendChild(insert);
            }
        </script>
    </head>
    
    <body>
        <p>
            使用说明：
            <br/>
            <br/>
            这里把C#后台绑定类的属性、方法全部列出来了，
            <b>
                部分操作需要参数，请在“代码示例”中，打开开发人员工具，在Consle中测试你感兴趣的方法
            </b>
            。（默认已经在右侧打开了开发人员工具）
            <br/>
            <br/>
            目前绑定的三个对象名称为：exampleA、exampleB、exampleObject，请在开发人员工具中测试，会有代码提示！
            <br/>
        </p>
        <hr/>
        <p>
            这里输出结果：
            <br/>
        </p>
        <div id="result">
        </div>
        <hr/>
        <b>
            exampleA.myFunction()会弹出一个C#对话框，可能会被窗口挡住，注意观察看任务栏，把它激活
        </b>
        <hr/>
        'exampleA'对象的所有方法：
        <br/>
        <ul>
            <script type="text/javascript">
                for (var name in exampleA) {
                    if (exampleA[name] != null) {
                        if (exampleA[name].constructor.name != 'Function') continue;
                        document.write("<li>" + name + "-----<input type='button' onclick='InsertResult(exampleA." + name + "());' value='exampleA." + name + "()' />-----" + exampleA[name] + "</li>");
                    }
                }
            </script>
        </ul>
        'exampleA'对象的所有属性：
        <br/>
        <ul>
            <script type="text/javascript">
                for (var name in exampleA) {
                    if (exampleA[name] != null) {
                        if (exampleA[name].constructor.name == 'Function') continue;
                        document.write("<li>" + name + "-----<input type='button' onclick='InsertResult(exampleA." + name + "());' value='exampleA." + name + "()' />-----" + exampleA[name] + "</li>");
                    } else {
                        document.write("<li>" + name + "-----<input type='button' onclick='InsertResult(exampleA." + name + "());' value='exampleA." + name + "()' />-----" + exampleA[name] + "</li>");
                    }
                }
            </script>
        </ul>
        <hr/>
        'exampleB'对象的所有方法：
        <br/>
        <ul>
            <script type="text/javascript">
                for (var name in exampleB) {
                    if (exampleB[name] != null) {
                        if (exampleB[name].constructor.name != 'Function') continue;
                        document.write("<li>" + name + "-----<input type='button' onclick='InsertResult(exampleB." + name + "());' value='exampleB." + name + "()' />-----" + exampleB[name] + "</li>");
                    }
                }
            </script>
        </ul>
        'exampleB'对象的所有属性：
        <br/>
        <ul>
            <script type="text/javascript">
                for (var name in exampleB) {
                    if (exampleB[name] != null) {
                        if (exampleB[name].constructor.name == 'Function') continue;
                        document.write("<li>" + name + "-----<input type='button' onclick='InsertResult(exampleB." + name + "());' value='exampleB." + name + "()' />-----" + exampleB[name] + "</li>");
                    } else {
                        document.write("<li>" + name + "-----<input type='button' onclick='InsertResult(exampleB." + name + "());' value='exampleB." + name + "()' />-----" + exampleB[name] + "</li>");
                    }
                }
            </script>
        </ul>
        <hr/>
        'exampleObject'对象的所有方法：
        <br/>
        <ul>
            <script type="text/javascript">
                for (var name in exampleObject) {
                    if (exampleObject[name] != null) {
                        if (exampleObject[name].constructor.name != 'Function') continue;
                        document.write("<li>" + name + "-----<input type='button' onclick='InsertResult(exampleObject." + name + "());' value='exampleObject." + name + "()' />-----" + exampleObject[name] + "</li>");
                    }
                }
            </script>
        </ul>
        'exampleObject'对象的所有属性：
        <br/>
        <ul>
            <script type="text/javascript">
                for (var name in exampleObject) {
                    if (exampleObject[name] != null) {
                        if (exampleObject[name].constructor.name == 'Function') continue;
                        document.write("<li>" + name + "-----<input type='button' onclick='InsertResult(exampleObject." + name + "());' value='exampleObject." + name + "()' />-----" + exampleObject[name] + "</li>");
                    } else {
                        document.write("<li>" + name + "-----<input type='button' onclick='InsertResult(exampleObject." + name + "());' value='exampleObject." + name + "()' />-----" + exampleObject[name] + "</li>");
                    }
                }
            </script>
        </ul>
        <hr/>
        <div style="display:none;">
            <script type="text/javascript">
                var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
                document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F73f8690e804607ec46bfd2f4375620cd' type='text/javascript'%3E%3C/script%3E"));
            </script>
            <script type="text/javascript">
                var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
                document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F2d23f9f93a74d085fbeb86b6d7607429' type='text/javascript'%3E%3C/script%3E"));
            </script>
        </div>
    </body>

</html>